<?php
/**
 * 统计库
 */
class LogBaseModel extends Model {

	protected $is_con	= false;

	protected function _initialize() {
		if($_SESSION[C('SELECT_HOST_KEY')]){
			$hostInfo =	$_SESSION[C('SELECT_HOST_KEY')];
			$dbname = $hostInfo['dbname'];
			$dbpwd  = $hostInfo['dbpwd'];
			$dbuser = $hostInfo['dbuser'];
			$dbpoint = $hostInfo['dbpoint'];
			$ip = $hostInfo['ip'];
			$this->connection = "mysql://$dbuser:$dbpwd@$ip:$dbpoint/$dbname";
			$this->tablePrefix= "log_";
			$this->is_con = true;
		}
	}
}
?>